//package com.sc.nft.service.impl;
//
//import com.sc.nft.dao.GoodsHitShelfBlacklistDao;
//import com.sc.nft.entity.GoodsHitShelfBlacklist;
//import com.sc.nft.service.GoodsHitShelfBlacklistService;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Service;
//
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.List;
//
//@Slf4j
//@RequiredArgsConstructor
//@Service
//public class GoodsHitShelfBlacklistServiceImpl implements GoodsHitShelfBlacklistService {
//
//    private final GoodsHitShelfBlacklistDao goodsHitShelfBlacklistDao;
//
//    @Override
//    public Boolean saveBeach(List<Long> userId) {
//        List<GoodsHitShelfBlacklist> list = new ArrayList<>();
//        userId.forEach(userIds -> {
//            Boolean aBoolean = goodsHitShelfBlacklistDao.userToDayCount(userIds);
//            // 为true的话说明今天已经拉黑过了
//            if (aBoolean) {
//                return;
//            }
//            GoodsHitShelfBlacklist goodsHitShelfBlacklist = new GoodsHitShelfBlacklist();
//            goodsHitShelfBlacklist.setUserId(userIds);
//            goodsHitShelfBlacklist.setBannedTime(new Date());
//            goodsHitShelfBlacklist.setCreateTime(new Date());
//            goodsHitShelfBlacklist.setModifyTime(new Date());
//            goodsHitShelfBlacklist.setCreateId(0L);
//            goodsHitShelfBlacklist.setModifyId(0L);
//            goodsHitShelfBlacklist.setIsDelete(false);
//            list.add(goodsHitShelfBlacklist);
//        });
//        goodsHitShelfBlacklistDao.saveBatch(list);
//        return Boolean.TRUE;
//    }
//
//}
